home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir37 / dosmnu58.zip / DOSMENU.DOC < prev    next >
Text File  |  1994-03-09  |  65KB  |  1,739 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                    DOSmenu
  19.  
  20.                       "Powerful, Easy Management System"
  21.  
  22.  
  23.  
  24.  
  25.                             (C)Copyright 1993-1994
  26.  
  27.                                       by
  28.  
  29.                                  Skip Bremer
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.                                  Version 5.8
  38.  
  39.                                   March 1994
  40.  
  41.                               TABLE OF CONTENTS
  42. ==============================================================================
  43.  
  44.      Topic                                                          Section
  45.      -----                                                          -------
  46.  
  47.      Introduction ......................................................  1
  48.  
  49.      Miscellaneous .....................................................  2
  50.  
  51.      Quick Start .......................................................  3
  52.  
  53.      Startup Batch File ................................................  4
  54.  
  55.      Commands ..........................................................  5
  56.  
  57.      Setup .............................................................  6
  58.  
  59.      Menu Definition ...................................................  7
  60.  
  61.      Menu Rules ........................................................  8
  62.  
  63.      Sub-Menus .........................................................  9
  64.  
  65.      Compiling Menu Files .............................................. 10
  66.  
  67.      Translating Menu Files ............................................ 11
  68.  
  69.      Temporary Batch Files ............................................. 12
  70.  
  71.      DOS Environment Variables ......................................... 13
  72.  
  73.      Noticing .......................................................... 14
  74.  
  75.      Personal Menus .................................................... 15
  76.  
  77.      Software Metering Service ......................................... 16
  78.  
  79.      DMutil Maintenance Utility ........................................ 17
  80.  
  81.      DMquery Batch Input Utility ....................................... 18
  82.  
  83.      DMmeter Metering Utility .......................................... 19
  84.  
  85.      Example Menu File.................................................. 20
  86.  
  87.                                INTRODUCTION (1)
  88. ==============================================================================
  89.  
  90. DOSmenu was designed as a simple yet powerful menu system for both network and
  91. stand-alone environments.  Our environment that demands an easily changeable,
  92. concise menu system to help us provide proper support for a large NetWare wide
  93. area network domain spanning Texas.  The menu system we needed had to be both
  94. easy to use and very flexible and yet it had to stay out of the way as much as
  95. possible for our user operations.  Quite simply, we couldn't find one, so we
  96. wrote our own.  We hope it helps you control your environment as well.  Please
  97. use DOSmenu as you see fit, but if you continue to use it, you should register
  98. according to the documentation in DMLEGAL.DOC.
  99.  
  100. Here is a quick overview of DOSmenu:
  101.  
  102. o    Small executable size.
  103.  
  104. o    No memory overhead.
  105.  
  106. o    Unlimited menus.
  107.  
  108. o    Run any program, including TSRs.
  109.  
  110. o    Many rights options to determine whether a menu item is usable by a user.
  111.  
  112. o    Automatically knows NetWare.  Substitutes are easily defined on other
  113.      networks and stand-alone environments.
  114.  
  115. o    Menu environment may be changed on-the-fly while users are active.
  116.  
  117. o    Optional compilation of menu files provides ultimate menu security.
  118.  
  119. o    One utility (DMutil) handles all menu setup tasks.
  120.  
  121. o    Can translate NetWare menu files.
  122.  
  123. o    Complete user logging and reporting capabilities.
  124.  
  125. o    Software Metering Service and reporting capabilities.
  126.  
  127. o    Full mouse support and menu utility set with registered version.
  128.  
  129.  
  130.                               MISCELLANEOUS (2)
  131. ==============================================================================
  132.  
  133. Requirements
  134. ------------
  135. DOSmenu's only known requirement is that it must run under DOS 3.1 or higher.
  136. It runs fine from a Windows DOS session (and it loads Windows fine).
  137.  
  138. Recommendations
  139. ---------------
  140. Consider placing the command
  141.  
  142.      SHELL=C:\COMMAND.COM /E:512 /P {or more}
  143.  
  144. in all CONFIG.SYS files using this menu system.  Although not required, if
  145. DOSmenu cannot find enough DOS environment variable space to write a menu
  146. command to a DOS variable, then it will not be able to run the command.
  147.  
  148. Maximum Limits
  149. --------------
  150. Menu files: unlimited
  151. Sub-menus per menu file: 15 (depending on memory available)
  152. Entries per menu: 20
  153. DOS commands per menu item: 10
  154. Rights per menu item: 10
  155. Items per right: 10
  156. Length of menu items: 50
  157. Length of menu rights: 120
  158. Length of menu commands: 80
  159. Length of help lines: 61
  160. Length of screen title: 40
  161. Question length: 70
  162. Active notices per user: 15
  163. Number of lines per notice: 10
  164. Length of notice lines: 70
  165. Metered applications: 100
  166.  
  167. Startup Options
  168. ---------------
  169. DOSmenu is started with the DOSMENU command from within a batch file.
  170. However, within this batch file, you may specify a user ID, a server name
  171. and/or a node address on the DOSmenu command line through parameters issued
  172. to the batch file.  This is not normally necessary because DOSmenu picks the
  173. user ID and server name up automatically on NetWare networks and you may
  174. define DOS variables that are identified from within the DOSmenu init file
  175. to determine the active user and active server on stand-alone environments.
  176.  
  177. Required Files
  178. --------------
  179. The following files are necessary to run DOSmenu:
  180.  
  181. DOSMENU.EXE    The DOSmenu program.
  182.  
  183. DMUTIL.EXE     The DOSmenu utility program.  Used to make, edit, compile and
  184.                decompile menu files.
  185.  
  186. DOSMENU.INI    The default DOSmenu init file initially made and edited with
  187.                DMutil.  This file is used to configure your menu system
  188.                environment.
  189.  
  190. DOSMENU.MNU    The default DOSmenu menu file initially made and edited with
  191.                DMutil.  This file is the default menu.
  192.  
  193. MENU.BAT       The startup batch file initially made and edited with DMutil.
  194.  
  195. Optional Files
  196. --------------
  197. DOSMENU.PER    Personal menu kept in user's private directory.
  198.  
  199. DOSMENU.NTE    The default DOSmenu note file initially made and edited with
  200.                DMutil.  This file holds user notices.
  201.  
  202. DOSMENU.LOG    If logging is enabled, this file is appended every time a user
  203.                performs a menu action.  Included statistics are:  user name,
  204.                node address, server name, date, time, menu action, active
  205.                menu name, and memory available.
  206.  
  207. DOSMENU.MTR    If metering is enabled, this is the central file where the
  208.                metering information is kept.
  209.  
  210. DMQUERY.EXE    An external utility that gets and uses batch file input.
  211.  
  212. DMMETER.EXE    An external software metering utility that can compliment the
  213.                metering services offered from within the menu system.
  214.  
  215. DMSAVER.EXE    An external screen saver (you may use your own as well).
  216.  
  217. NOBREAK.EXE    Self-extracting file containing a very useful utility that can
  218.                help to guarantee security within your menu system with an
  219.                approach that is different than the inherent DOSmenu
  220.                {r=nobreak} rights option.
  221.  
  222. Many additional utility programs (see DMBONUS.DOC) and full mouse support are
  223. shipped with the registered version.
  224.  
  225.                                QUICK START (3)
  226. ==============================================================================
  227.  
  228. To quickly get the menu system up and running, do the following (check the
  229. documentation later for specifics):
  230.  
  231. o    Copy all DOSmenu files to a permanent home directory
  232.  
  233. o    Change to that home directory
  234.  
  235. o    Run 'DMUTIL /M' to make the default menu files
  236.  
  237. o    Run 'DMUTIL' to setup all menu system files
  238.  
  239. o    Run 'DMUTIL /C DOSMENU.INI' to compile the init file -optional
  240.  
  241. o    Run 'DMUTIL /C DOSMENU.MNU' to compile the menu file -optional
  242.  
  243. o    Move MENU.BAT to a directory in your users' path
  244.  
  245. o    Run 'MENU' to start the menu system
  246.  
  247.                            STARTUP BATCH FILE (4)
  248. ==============================================================================
  249.  
  250. As part of the initial file installation performed by DMutil, the file
  251. MENU.BAT will be made in DOSmenu's home directory.  MENU.BAT _must_ be moved
  252. to your users' path, but the rest of the DOSmenu files _must_ stay in
  253. DOSmenu's home directory.  All users must be able to 'read' this directory.
  254.  
  255. Here is a commented MENU.BAT:
  256.  
  257. @echo off                           ;Cosmetics only
  258. ::this batch file must be in users' path
  259. ::uncomment variation of next line on networks when you don't want the menu to
  260. ::  appear if user is not logged in (especially if MENU.BAT is in LOGIN dir)
  261. REM if not exist f:\public\*.* goto END
  262. ::replace %4 on next line only with menu name if not starting with DOSMENU.MNU
  263. f:\login\dosmenu /batch %1 %2 %3 %4 %5 ;Point to/run DOSmenu {with parameters
  264.                                     ;  if desired (not required on NetWare)}
  265. ::quitting the menu system?         ;255 passed with F10 or 'goto END' passed
  266. if errorlevel 255 goto END          ;If so, then leave loop and batch file
  267. ::run variable set by DOSmenu (DOS command or temporary batch file name)
  268. %_dmcmd%                            ;The DOS command or temp batch file name
  269. ::do it again                       ;Keep running the batch file (and the menu
  270. menu %1 %2 %3 %4 %5 %_dmmnu% /rerun ;  system) and until the system is stopped
  271. :END                                ;Place to go to when quitting
  272.  
  273. Be cautious about changing this batch file!
  274.  
  275. Parameters are normally only needed if you are not running on NetWare and have
  276. not set the names of the user ID and server name variables to be used by
  277. DOSmenu in the menu file and you are not running in a stand-alone environment.
  278.  
  279. The DOS variable _dmcmd is loaded as either the actual menu command or as a
  280. temporary batch file path and name made by DOSmenu when it combined the
  281. commands for the selected menu item.
  282.  
  283. The _dmmnu DOS variable holds the name of the current 'main menu' and an
  284. array to get back to the last sub-menu and item.
  285.  
  286. Quitting will move to the end of the batch file, thereby stopping the system.
  287. You can place a quit command on your user's menu to do the same thing by
  288. defining a single DOS command for that menu item as 'goto END'.
  289.  
  290.                                  COMMANDS (5)
  291. ==============================================================================
  292.  
  293. F1   HELP      Brings up context sensitive help.  Press it anytime.
  294.  
  295. F2   DOS       Performs any DOS command from within the confines of the menu
  296.                system.  This key may be password protected.
  297.  
  298. F3   VIEW DOS  Views the last DOS screen.  If quit timing is enabled and an F2
  299.                password is enabled, this option is password protected.
  300.  
  301. F4   VIEW NOTE Views any notices that were directed at a user, and any new
  302.                notice that may have been added since the last time they
  303.                accessed the note file.
  304.  
  305. F5   PERSONAL  Load user's personal menu file.  This option may be disabled.
  306.  
  307. F6   EDIT PER  Edit personal menu file.  The option may be disabled.
  308.  
  309. F7   VIEW MENU Views the commands of the highlighted menu item.
  310.  
  311. F8   VIEW MTR  Views the active software meter file, showing actual concurrent
  312.                usage of metered applications.  If quit timing is enabled and
  313.                the F9 password is enabled, this option is password protected.
  314.  
  315. F9   ADMIN     Edits all of the menu system files at one time, interactively,
  316.                while running the menu system.  DMUTIL.EXE must be in DOSmenu's
  317.                home directory.  This key may be password protected.
  318.  
  319. F10  QUIT      Quits DOSmenu (and quits the startup batch file by passing a
  320.                255 errorlevel).  This key may be password protected.
  321.  
  322. ESC  PREVIOUS  Backs up to the previous menu or cancels a question.
  323.  
  324. MOUSE          (registered version only)  Normally, the left mouse button
  325.                simulates the Enter key and the right mouse button simulates
  326.                the Esc key.  However, you may also use the mouse to manipulate
  327.                the scroll bars, point directly to menu items and then click on
  328.                them to run them.
  329.  
  330.                                   SETUP (6)
  331. ==============================================================================
  332.  
  333. DOSmenu has two setup phases, the initial default file creation and then
  334. configuration.
  335.  
  336.  
  337. DEFAULT FILE CREATION
  338. =====================
  339.  
  340. After moving all DOSmenu files to a permanent home directory, and then moving
  341. to that directory, you must run DMUTIL /M to make the initial menu file set
  342. consisting of DOSMENU.INI (the init file), DOSMENU.MNU (the menu file shell),
  343. DOSMENU.NTE (the note file) and MENU.BAT (the startup batch).  DOSmenu must
  344. run from a batch file for the reasons discussed below.  We will use the name
  345. MENU.BAT throughout this documentation, however it may be renamed.  It must be
  346. found in the users' path.
  347.  
  348.  
  349. CONFIGURATION
  350. =============
  351.  
  352. After DOSMENU.INI is created, you need to edit it in order to set the
  353. environment for your specific system.  You may edit this file with DMUTIL.
  354. The init file contains various options and switches that control how DOSmenu
  355. (and DMutil) will work for you and your users.  These are discussed here.
  356.  
  357.  
  358. [DMutil]
  359.  
  360. Activate mouse=
  361. ---------------
  362. Default=yes.  With the registered version, you may optionally engage use of a
  363. mouse (if a mouse driver is available) or disengage use.  Disengaging can be
  364. useful if your system takes a long time to reset the mouse driver when loading
  365. DOS mouse-aware programs.
  366.  
  367. DOSmenu Startup Batch File=
  368. ---------------------------
  369. Default={directory you built files in originally}.  This option allows DMutil
  370. to load your startup batch file when loading the other menu system files with
  371. the DMUTIL command.  After moving the MENU.BAT to your users' path, you should
  372. enter the path and name of the file here.
  373.  
  374.  
  375. [Interface]
  376.  
  377. Use Mouse=
  378. ----------
  379. Default=yes.  With the registered version, you may optionally use your mouse
  380. to manipulate your menu.  A mouse driver (like MOUSE.COM) must be loaded on
  381. the work station to enable mouse support.
  382.  
  383. Desktop Color=
  384. --------------
  385. Default=21(for color machines) or 70(for monochrome machines).  This number
  386. determines the color of the menu system's desktop background.  The first
  387. number represents the foreground color, and the second number represents the
  388. background color.  If you enter only one color, then it will represent the
  389. background color and the foreground color will be 0.  Entering nothing or 0 or
  390. 00 will disable the desktop background.  For example:
  391.  
  392.      71 = white fore on blue back
  393.      7  = black fore on white back
  394.      0  = no desktop background
  395.  
  396. The standard MS-DOS colors are:
  397.  
  398.      0=black  1=blue  2=green  3=cyan  4=red  5=magenta  6=brown  7=white
  399.  
  400. Screen Saver Time=
  401. ------------------
  402. Default=0.  0 disables screen saving.
  403.  
  404. Screen Saver File=
  405. ------------------
  406. Default=[path]dmsaver.  You may use your own saver as well.  Keep in mind that
  407. using a screen saver WILL NORMALLY NEGATE a timed logout system (see below).
  408.  
  409. Screen Title=
  410. -------------
  411. Default=DOSmenu Menu System.  You may place your company name or something
  412. similar here, if you desire.  If this item is left blank, then there will be
  413. no information line at the top of the screen.  This line usually shows the DOS
  414. memory free amount, the Screen Title, and the name of the current menu file.
  415.  
  416. Support Comment=
  417. ----------------
  418. Default=For HELP Please Call Computer Support.  This phrase will be shown
  419. blinking at the bottom of the main help window so that your users will easily
  420. know what to do in case they need help.  We recommend placing your support
  421. telephone number within this phrase.
  422.  
  423.  
  424. [Network]
  425.  
  426. Using NetWare=
  427. --------------
  428. Default=yes.  This switch tells DOSmenu whether it should make NetWare API
  429. calls to determine the actual user and server in force when it is running.
  430. These two pieces of information can be overridden by you whenever you wish by
  431. one of the following methods:
  432.  
  433.      Set DOS variables equal to the current network user and file server and
  434.      then define those variables for DOSmenu (below).  This option is useful
  435.      when running on non-NetWare networks.  For instance, if you set the DOS
  436.      variable _USER to the actual user ID in the network login script, then it
  437.      will be found and used by DOSmenu if you enter _USER as the user DOS
  438.      variable with the option below.
  439.  
  440.           Non-NetWare DOS User Var=_user
  441.           Non-NetWare DOS Server Var=_server
  442.  
  443.      Or you may place them directly in the batch file, like
  444.  
  445.           path\dosmenu /batch /u:%_user% /s:%_server%
  446.  
  447.      or type them when running the batch file, like
  448.  
  449.           menu /u:_user /s:_server
  450.  
  451. The priority DOSmenu uses to obtain this information is as follows:
  452.  
  453.      1.  Actual NetWare information if NetWare=yes and on a Novell network.
  454.      2.  Already set DOS variables (overrides 1.).
  455.      3.  Command line parameters (overrides both 1. and 2.).
  456.  
  457. Non-NetWare DOS User Var=
  458. -------------------------
  459. Default={nothing}.  As discussed above, this option allows DOSmenu to find the
  460. user ID for the person running the menu system when not on a NetWare network
  461. (or when you decide to override the API method).
  462.  
  463. Non-NetWare DOS Server Var=
  464. ---------------------------
  465. Default={nothing}.  As discussed above, this option allows DOSmenu to find the
  466. server name for the person running the menu system when not on a NetWare
  467. network (or when you decide to override the API method).
  468.  
  469. Any-Network DOS Node Var=
  470. -------------------------
  471. Default={nothing}.  This option allows DOSmenu to use the work station network
  472. node address as a determinant as to whether a menu item will be available or
  473. not.
  474.  
  475. Private Directory=
  476. ------------------
  477. Default=c:\.  DOSmenu will write an on-the-fly batch file to run menu commands
  478. embedded within the menu file _only_ when there is more than one command for
  479. the chosen menu item.  When this happens, this batch file must be written to
  480. an area where the user has write rights.
  481.  
  482. Typically, on networks, a 'private' area is mapped for each user on login as
  483. their personally mapped drive (actually just a network directory based on the
  484. user's ID) on the server.  In such a case, you should place that location
  485. here.  An example might be H:\ if you had performed a
  486.  
  487.      MAP ROOT F:\USERS\%LOGIN_NAME to H:\ (on a Novell network).
  488.      
  489. If no such directory is mapped or used on your network, then we suggest using
  490. C:\, which should always be private to the user for every session.
  491.  
  492. If you would rather have all users write their on-the-fly batch files (when
  493. necessary) to the same location, that is OK as long as you are on a Novell
  494. network because DOSmenu also knows and uses the actual user connection number
  495. as part of the batch file name, e.g., _DMBT4.BAT, where this user is using
  496. connection number 4.  In this case, simply define the Private Directory as any
  497. one place on the network where all users have 'write' rights.
  498.  
  499. Remember, this batch file is only written if more than one DOS command is
  500. defined as part of a chosen menu item.  You may actually specify two private
  501. locations for this option, like
  502.  
  503.      Private Directory=h:\,c:\
  504.  
  505. to help take care of special cases like when a user does not have the proper
  506. network mappings.
  507.  
  508. On a stand-alone environment, you do not need to define a Private Directory,
  509. and in that case, any temporary batch files will be written to DOSMENU.EXE's
  510. home directory.
  511.  
  512. Allow Personal Menus=
  513. ---------------------
  514. Default=yes.  If yes, then each user may maintain, run and edit a personal
  515. menu file, DOSMENU.PER, that resides in their defined private directory (see
  516. above).  User's must have WRITE rights to this directory.
  517.  
  518. Force Personal NoBreaks=
  519. ------------------------
  520. Default=yes.  If personal menus are allowed, this protects the security of
  521. your system by forcing all menu items on the user menu to be run with the
  522. {r=nobreak} right set.  This effectively eliminates the possibility of a user
  523. breaking out of a batch file or DOS command by pressing ^C or ^Break.
  524. Strongly recommended.  However, understand that any batch file that uses an
  525. embedded NetWare search mapping command will not be honored in this case.  The
  526. alternative is to use the included NOBRK TSR utility.
  527.  
  528.  
  529. [Security]
  530.  
  531. F2 Run DOS Password=
  532. --------------------
  533. Default={nothing}.  If filled in, DOSmenu will require this password before
  534. allowing users the option of composing and running their own DOS commands,
  535. just as they would at the DOS prompt.  If security is a factor, place a
  536. password here and later compile the DOSMENU.INI file with
  537.  
  538.      DMUTIL /C DOSMENU.INI.
  539.  
  540. When F2 is pressed, an answer box will pop up asking the user for a DOS
  541. command.  Also for safety reasons, if a user enters nothing or a command that
  542. has the word 'command' anywhere within it, then it will be ignored.  This is
  543. to prevent a user from actual going to DOS by loading another copy of
  544. COMMAND.COM.
  545.  
  546. F9 Admin Password=
  547. ------------------
  548. Default={nothing}.  If filled in, DOSmenu will require this password before
  549. allowing anyone to edit the menu system files.  If security is a factor, place
  550. a password here and later compile the DOSMENU.INI file with
  551.  
  552.      DMUTIL /C DOSMENU.INI.
  553.  
  554. If no password is defined, then anyone can edit your menu system.
  555.  
  556. This password is also queried by DMutil in case someone tries to run DMutil
  557. from DOS.
  558.  
  559. F10 Quit Menu Password=
  560. -----------------------
  561. Default={nothing}.  If filled in, DOSmenu will require this password
  562. before allowing users the option of quitting the menu system. 
  563. If security is a factor, place a password here and later compile the
  564. DOSMENU.INI file with
  565.  
  566.      DMUTIL /C DOSMENU.INI.
  567.  
  568. If no password is defined, then the user will be prompted to be sure they wish
  569. to quit the menu system.
  570.  
  571. Use Software Metering=
  572. ----------------------
  573. Default=no.  When enabled, the METER right will be enabled in your menu
  574. system.  You will be able to meter any software application your users employ,
  575. which can help keep you and your company out of trouble.  See the Software
  576. Metering Service section for specifics.
  577.  
  578. Meter File=
  579. Default={nothing}.  If metering is enabled, then a path and filename must be
  580. entered here.  This file will become the central metering file for your system
  581. (on the current server).  Users must have write and erase rights for this
  582. file.
  583.  
  584. Use Logging=
  585. ------------
  586. Default=yes.  When enabled, the user's log file is appended to every time a
  587. user performs a menu action.  Included statistics are:  user name, node
  588. address, server name, date, time, menu action, active menu name, and memory
  589. available.  The file is normally written to the user's defined private
  590. directory.
  591.  
  592. Central Logging=
  593. ----------------
  594. Default=no.  If yes, then one log file for all users is written to the file
  595. specified in the next entry.
  596.  
  597. Central Log File=
  598. -----------------
  599. Default={nothing}.  Where to write central log information to, if activated.
  600. Users must have write rights to this area.
  601.  
  602. Timed Quit Menu Time=
  603. ---------------------
  604. Default=0.  This option, if enabled, allows you to control your user's allowed
  605. time of inactivity before forcing them off of the network (or simply out of
  606. the menu system).  On our network, connections are at a premium, so we use
  607. this option to remove users from the network after 30 minutes of inactivity on
  608. their part.  We do this by entering the command 'logout' for the Quit Menu
  609. Command (discussed below).  Entering 0 or nothing disables this function.
  610.  
  611. Timed Quit Menu Command=
  612. ------------------------
  613. Default=logout.  If automatic quitting is enabled via the option above, then
  614. whatever is placed in this option will be run when the automatic quit is
  615. invoked.  Obviously entering 'logout' will log the user out of a Novell
  616. network.  If you simply wanted to remove a user from the menu system at
  617. automatic quit, then enter 'goto end' here.  This in affect will take the user
  618. out of the MENU.BAT internal loop that normally keeps DOSmenu going.
  619.  
  620.  
  621. [Global Keys]
  622.  
  623. AltF? Text= (where ? = 1 to 5)
  624. -----------
  625. Default={variable}.  These lines determine what text will show by a global
  626. alternate function key.
  627.  
  628. Alt? Cmnd= (where ? = 1 to 5)
  629. ----------
  630. Default={variable}.  These lines hold the DOS command for the appropriate
  631. global alternate function key.  These commands are alsways shown, when
  632. defined, and are run with the {r=nobreak} option, just like F2 DOS commands.
  633. You may place a '@' within a command to prompt for a question.  If no commands
  634. are defined, then pressing the Alt key will not show them on screen.
  635.  
  636.  
  637. After defining the above switches/options, you are ready to set up
  638. DOSMENU.MNU which contains the actual menus that will be used by the menu
  639. system.
  640.  
  641.                              MENU DEFINITION (7)
  642. ==============================================================================
  643.  
  644. There are two conventions used to control the menu or menus a user gets when
  645. running the menu system, server-based and rules-based.  These conventions are
  646. much more difficult to explain than to actually use, so we will briefly both
  647. describe and show example code, offset with ';-----', throughout.
  648.  
  649.  
  650. SERVER-BASED CONVENTION
  651. =======================
  652.  
  653. Approaching the DOSMENU.MNU menu file from the top down, the system can be
  654. thought of as a server-based system.  This can become quite robust, as in our
  655. eight-server domain or quite simple, as in the case of a single server or a
  656. stand-alone environment.  Basically, the file is divided vertically into
  657. server sections that are defined by the actual server name.  An all
  658. encompassing name is also allowed and it is called ALL.  Each server name, and
  659. the ALL choice, must start at the beginning of a line with a colon, e.g.,
  660. :OUR_SERVER or :ALL.  You can have more than one section defined with the same
  661. server name, such as an :ALL section at the beginning and at the end allowing
  662. you to show certain all-encompassing menu items at the top and also at the
  663. bottom of each user's menu.  Here is a segment of a menu definition showing
  664. the vertical server-based method:
  665.  
  666. ;-----
  667. %Main Menu
  668.  
  669. :ALL
  670. Word Perfect
  671.         wp
  672.  
  673. :MAIN_SERVER
  674. Paradox
  675.         paradox
  676. Lotus 1-2-3
  677.         123
  678.  
  679. :SECOND_SERVER
  680. Proprietary application
  681.         ourapp
  682.  
  683. :ALL
  684. Logout of the network
  685.         logout
  686. ;-----
  687.  
  688. In the above example, you can see that a person who is running on the main
  689. server would get the following main menu:
  690.  
  691. _____
  692. Word Perfect
  693. Paradox
  694. Lotus 1-2-3
  695. Logout of the network
  696. _____
  697.  
  698. while a person running on the second server would get:
  699.  
  700. _____
  701. Word Perfect
  702. Proprietary application
  703. Logout of the network
  704. _____
  705.  
  706. Note that any menu items (and sub-menus and their items) may be accessible
  707. depending upon which section they are placed under, subject to the next
  708. convention of discrimination, rules-based, which is discussed below.
  709.  
  710.  
  711. RULES-BASED CONVENTION
  712. ======================
  713.  
  714. A secondary, more powerful means of segregating the menu file between users is
  715. the rules-based method.  Whereas the server-based convention may be viewed as
  716. vertical, think of the rules-based convention as horizontal.  In other words,
  717. after deciding which server a user is using, we then must decide what the
  718. rights of that user are, and this convention does just that.  Let's discuss
  719. each method in detail.
  720.  
  721.  
  722. All rights assumed
  723. ------------------
  724. Rule = no rule line entered.  This method is the quickest and least secure way
  725. of checking users rights because it checks nothing.  In other words, a menu
  726. item will show up on a user's menu if it is under the correct server name (or
  727. ALL), period.  Here, you will be relying on your defined network rights to
  728. determine whether a user will be able to _run_ an item or not (they will see
  729. them on their menu).  This method is, of course, exactly what you would
  730. normally use if you were on a stand-alone environment.
  731.  
  732. ;-----
  733. Paradox
  734.         paradox
  735. ;-----
  736.  
  737. User gets item if it is available, period.
  738.  
  739.  
  740. Directory rights
  741. ----------------
  742. Rule = {d=directory name or d=directory name1,directory name2 ..}.  DOSmenu
  743. will look to see if any of the listed directories exist for the user when it
  744. reads the menu file, and if none of them do, it will not place the item on the
  745. user's menu.
  746.  
  747. ;-----
  748. Paradox 
  749.         {d=c:\apps\paradox}
  750.         paradox
  751. ;-----
  752.  
  753. User gets item only if F:\APPS\PARADOX is 'visible' in the user's environment.
  754.  
  755.  
  756. File rights
  757. -----------
  758. Rule = {f=file name or f=file name1,file name2 ..}.  DOSmenu will look to see
  759. if any of the listed files exist for the user when it reads the menu file, and
  760. if none of them do, it will not place the item on the user's menu.
  761.  
  762. ;-----
  763. Paradox
  764.         {f=f:\apps\paradox\paradox.exe}
  765.         paradox
  766. ;-----
  767.  
  768. User gets item only if F:\APPS\PARADOX\PARADOX.EXE is 'visible' in the user's
  769. environment.
  770.  
  771.  
  772. Server rights (NetWare only unless DOS variable/command line parameters used)
  773. -------------
  774. Rule = {s=server_name1 or s=server_name1,server_name2 ..}.  Do not confuse
  775. this method with the server-based convention.  Here, by placing one or more
  776. server names with a menu item, you are saying only show this item when the
  777. user is logged into one of those servers.
  778.  
  779. ;-----
  780. Paradox
  781.         {s=main_server}
  782.         paradox
  783. ;-----
  784.  
  785. User gets item only if the user is logged into and running on MAIN_SERVER.
  786.  
  787.  
  788. Group rights (NetWare only unless DOS variable/command line parameters used)
  789. ------------
  790. Rule = {g=group_name1 or g=group_name1,group_name2 ..}.  Normally you define
  791. groups to group certain users that you can later assign trustee rights to,
  792. thereby giving them access to certain programs.  This method allows you to use
  793. that work when discriminating in your menu system.  There is an advantage
  794. here, however, in that even if you do not bother with trustee rights and your
  795. network is fairly open, DOSmenu will act like it is all set up just right.  In
  796. other words, DOSmenu doesn't care about the actual rights; it only cares about
  797. whether the user is in the group name or group names that you tell it.  If
  798. not, then the user does not get the menu item displayed (and therefore cannot
  799. run it).
  800.  
  801. ;-----
  802. Paradox
  803.         {g=paradox}
  804.         paradox
  805. ;-----
  806.  
  807. User gets item only if a member of group PARADOX.
  808.  
  809.  
  810. User rights (NetWare only unless DOS variable/command line parameters used)
  811. -----------
  812. Rule = {u=user_id or u=user_id1,user_id2 ..}.  This method takes the
  813. discrimination down to the actual user id running the system.  If the user
  814. name is in the list, then the user gets the item on their menu (if any other
  815. specified rights are also approved and the server-based convention allows it).
  816.  
  817. ;-----
  818. Paradox
  819.         {u=joeb}
  820.         paradox
  821. ;-----
  822.  
  823. User gets item only if his user logon ID is JOEB.
  824.  
  825.  
  826. Node rights (DOS variable/command line parameter is required for this right)
  827. -----------
  828. Rule = {n=node_address or n=node_address1, node_address2 ..}.  This method
  829. takes the discrimination down to the actual user's work station.  If the node
  830. address is the same as that of the work station, then the user gets the item
  831. on their menu (if any other specified rights are also approved and the
  832. server-based convention allows it).
  833.  
  834. ;-----
  835. Paradox
  836.         {n=fa164505}
  837.         paradox
  838. ;-----
  839.  
  840. User gets item only if his work station's address is FA164505.
  841.  
  842. You must pull the work station's node address to DOS by setting it to a DOS
  843. variable from within the network's initial login script.  Only then can you
  844. check for it from the menu system.
  845.  
  846.  
  847. Environment rights
  848. ------------------
  849. Rule = {e=dos_env_var~env_var_text, ..}.  This right tests for the contents of
  850. a DOS variable.  For instance, to run a menu item depending on what room a
  851. person is in, set ROOM=room_number at login; then enter this right for the
  852. menu item in the menu file:  {e=room~102}  to test for room 102.
  853.  
  854.  
  855. Today rights
  856. ------------
  857. Rule = {t=su,mo,tu,we,th,fr,sa}.  This right tests to see if the current day
  858. is equal to the day specified.
  859.  
  860.  
  861. Date greater than rights
  862. ------------------------
  863. Rule = {>=MM/DD/YYYY}.  This right tests to see if the current day is greater
  864. than the specified date (must be in this format).
  865.  
  866.  
  867. Date same as rights
  868. -------------------
  869. Rule = {==MM/DD/YYYY}.  This right tests to see if the current day is the same
  870. as the specified date (must be in this format).
  871.  
  872.  
  873. Date less than rights
  874. ---------------------
  875. Rule = {<=MM/DD/YYYY}.  This right test to see if the current day is less than
  876. the specified date (must be in this format).
  877.  
  878.  
  879. Password rights
  880. ---------------
  881. Rule = {p=password where password is any alphanumeric, non-case sensitive,
  882. from 1 to 10 characters long}.  Placing a password on a menu item means that
  883. when the user selects this item (no matter what type it is - command or
  884. sub-menu), the user will be prompted for the correct password.
  885.  
  886. ;-----
  887. Paradox
  888.         {p=restrict}
  889.         paradox
  890. ;-----
  891.  
  892. User gets item only if he or she can answer the password prompt with RESTRICT.
  893.  
  894.  
  895. Question rights (not really a 'right')
  896. ---------------
  897. Rule = {q=your question that demands a yes/no answer?}  This method simply
  898. pops up your question and asks for a Yes or No answer.  If the answer is no,
  899. then the item will not be run.
  900.  
  901. ;-----
  902. Paradox
  903.         {q=Are you sure?}
  904.         paradox
  905. ;-----
  906.  
  907.  
  908. Software metering rights (not really a 'right')
  909. ------------------------
  910. Rule = {m=command:number}.  Entering this rule on an item's right line will
  911. force the command for the item to be metered, if metering is turned on and the
  912. meter file has been defined (within DOSMENU.INI).  Please see the Software
  913. Metering Service section for a complete discussion of this capability.
  914.  
  915. ;-----
  916. W WordPerfect
  917.         {m=wp51:25}
  918.         f:\apps\wp\wp
  919. ;-----
  920.  
  921. This many item will run as long as less than 25 other users are running it at
  922. the same time.
  923.  
  924.  
  925. Meter dot display (not really a 'right')
  926. -----------------
  927. Rule = {x=1 or 0}.  Allows you to not display the meter dot by the menu item
  928. or to display it in case you are metering the item externally with DMmeter.
  929.  
  930.  
  931. Run rights (not really a 'right')
  932. ----------
  933. Rule = {r=nobreak}.  This is where you determine whether batch files will be
  934. run with a second copy of the DOS command processor (NOBREAK) or not.  This
  935. right is only appropriate when running multi-line commands (which DOSmenu
  936. turns into batch files) or by running batch files; it should not be used
  937. unless batch files are being run (and then it is your choice).  One
  938. disadvantage of running NOBREAK is that NetWare search mapping commands
  939. generated within a batch file will not work.  Consider the included NOBRK TSR
  940. utility for fool-proof disabling of the ^C and ^Break keys.
  941.  
  942. ;-----
  943. M My batch file
  944.         {r=nobreak}
  945.         dir \
  946.         pause
  947. ;-----
  948.  
  949. ;-----
  950. WordPerfect
  951.         {r=nobreak}
  952.         wp.bat
  953. ;-----
  954.  
  955.  
  956. Location rights (not really a 'right' -for notices in note file only)
  957. ---------------
  958. Rule = {r=one_to_three_letters}.  You may optionally place this right on a
  959. notice to set the location of it on the screen, like
  960.  
  961. ;-----
  962. {l=tl}
  963. A note
  964. ;-----
  965.  
  966. where T=top, L=left, B=bottom, and R=right, N=noise and F=Flash title.
  967.  
  968.  
  969. NOTES
  970. =====
  971.  
  972. More than one of the above methods may be used at one time, either within the
  973. same right grouping or by having two or more groupings separated with a ';'.
  974. For example, you can place both a server (s=) method and a group (g=) method
  975. on the same menu item, like:
  976.  
  977. ;-----
  978. Paradox
  979.         {g=paradox} {s=server1}
  980.         paradox
  981. ;-----
  982. Here, it is read as member of paradox group _AND_ on server1.
  983.  
  984. ;-----
  985. Paradox
  986.         {g=paradox;s=server1}
  987.         paradox
  988. ;-----
  989. Here, it is read as member of paradox _OR_ on server1.
  990.  
  991. Note that when using more than one grouping, each of the groupings must be
  992. true for the item to be shown (they are ANDed).  When using one or more
  993. methods within the same group, they are ORed.
  994.  
  995. Placing a '!' before a name means 'not'.  Where {g=paradox} means if the
  996. current user is a member of group paradox, then display the menu item;
  997. {g=!paradox} means display the item only if the current user is NOT a member
  998. of group paradox (they are ORed only within each set of braces {}).
  999.  
  1000. You may use spaces instead of commas.  The syntax {g=group1,group2} is the
  1001. same as {g=group1 group2}.
  1002.  
  1003. The biggest rule that you must remember about the rights methods are that
  1004. within each set of braces {}, the answer must be true.  So if you use more
  1005. than one set of braces for a menu item, they all must be true.  For example:
  1006.  
  1007. ;-----
  1008. P Paradox
  1009.         {g=paradox} {u=joe,jim;n=fa164505} {s=!server2}
  1010. ;-----
  1011.  
  1012. will only show on the menu if the user is a member of the PARADOX group _AND_
  1013. the user is JOE _OR_ JIM _OR_ the node address is FA164505 _AND_ the user is
  1014. not on SERVER2.
  1015.  
  1016.  
  1017. TESTING YOUR MENU
  1018. =================
  1019.  
  1020. After you have placed a lot of restrictions on your menu items, you may find
  1021. it frustrating to see what the final outcome of an item looks like.  There is
  1022. a way around this.
  1023.  
  1024. Enter a bogus user id and server name from the command line.  For instance, if
  1025. you reside on SERVER1 but wish to check the appearance of SERVER2's menu, then
  1026. enter the startup batch file with the command
  1027.  
  1028.      MENU /U:USER_ID /S:SERVER2
  1029.  
  1030. where user_id is the name you wish to check for SERVER2.  You can do this for
  1031. all of your servers and any user.
  1032.  
  1033.                                 MENU RULES (8)
  1034. ==============================================================================
  1035.  
  1036. The syntax for the menu file requires certain conventions.  In most cases,
  1037. DOSmenu will issue an error message if it has trouble interpreting the file
  1038. because of a syntax violation of one of the below described rules.  If you get
  1039. stuck in an error loop within the batch file, press Alt-F10 at the read error
  1040. message window to quit.
  1041.  
  1042.  
  1043. RULES
  1044. =====
  1045.  
  1046. Main menu name
  1047. --------------
  1048. The first line of the file must be the main menu's name, starting with a
  1049. percent symbol '%'.  You can optionally place the starting x and y coordinates
  1050. of the menu window after the menu name, like:  %Main Menu, 5, 10.  This means
  1051. the upper left corner of the menu will be 5 columns from the left edge and 10
  1052. rows from the top.
  1053.  
  1054. Server sections
  1055. ---------------
  1056. There must be at least one server name before any menu items, unless
  1057. operating in a standalone environment.  In a network environment, use :ALL, as
  1058. a minimum, just after the main menu title and the one REQUIRED blank line.
  1059.  
  1060. Comments
  1061. --------
  1062. Any line starting with a semi-colon ';' is a programming comment only.
  1063.  
  1064. Blank lines
  1065. -----------
  1066. Blank lines are only allowed (and, in fact, REQUIRED) before server sections
  1067. and menu titles.  See the Menu File Example section for a properly formatted
  1068. file.
  1069.  
  1070. Menu action character
  1071. ---------------------
  1072. The first letter of a menu item will always be highlighted and will be
  1073. searched when the used presses a key to move to a particular menu item.  It
  1074. may or may not be part of the first word of the menu item.  For example,
  1075.  
  1076.      Lotus 1-2-3
  1077. and
  1078.  
  1079.      L Lotus 1-2-3
  1080.  
  1081. offer the same result.  It is a cosmetic choice that you must make.  Of
  1082. course, you could also use
  1083.  
  1084.      1 Lotus 1-2-3.
  1085.  
  1086. Indenting
  1087. ---------
  1088. All server name lines and menu item lines must NOT be indented.  All help
  1089. lines, rights lines and DOS commands MUST be indented at least one space.  A
  1090. tab character is allowed for the indentation.
  1091.  
  1092. Rights line length
  1093. ------------------
  1094. The maximum length from the beginning of the rights ({}{}..) line from
  1095. beginning to end (not including spaces or beginning tabs) is 80.  You may have
  1096. more than one rights line per menu item for convenience, put there character
  1097. count must all add up to 80 or less.  (You may only have one rights line per
  1098. notice in the note file.)
  1099.  
  1100. Parameters
  1101. ----------
  1102. Single-command menu items may be setup to ask the user for a parameter prior
  1103. to actually running the command associated with the menu item.  This is not
  1104. allowed for multi-command menu items.  Place a question mark '@' at the exact
  1105. location you wish to add input to the command.  Here are some examples:
  1106.  
  1107. dir @ /p
  1108. chkdsk @:
  1109. format @: /u
  1110.  
  1111. For multi-command items and multi-response items, use the DMquery syntax.
  1112.  
  1113. Sub-menu names
  1114. --------------
  1115. All sub-menu names, both when called as a command and when entered as a
  1116. sub-menu title, must start with the percent symbol '%'.  There MUST be a
  1117. blank line before the sub-menu name.  Sub-menus must come somewhere _after_
  1118. the menu item that calls them.
  1119.  
  1120. Help lines
  1121. ----------
  1122. Help lines for each menu item, if used, must be indented and start with a
  1123. number symbol '#'.  There can be a maximum of one help line per menu item.
  1124.  
  1125.  
  1126. NOTES
  1127. =====
  1128.  
  1129. You may rename DOSMENU.MNU to another name or copy it to another menu file
  1130. because DOSmenu will run any menu file that you have as long as you
  1131. specify that file name on the command line.  Note that the .MNU is assumed.
  1132. No other extension is allowed.
  1133.  
  1134.      MENU [/U:USER1] [/S:SERVER1] MYMENU.MNU
  1135.  
  1136. and
  1137.  
  1138.      MENU MYMENU
  1139.  
  1140. will both attempt to load MYMENU.MNU from DOSmenu's home directory (where all
  1141. menu files MUST be located).
  1142.  
  1143.  
  1144. LOADING ADDITION MENUS
  1145. ======================
  1146.  
  1147. You may switch menu files from within the menu system by LOADing them or
  1148. /MENUing them.  This is accomplished by placing the /LOAD MENU_FILE (specify
  1149. NO path) or /MENU MENU_FILE (NO path) as the first and only command line for a
  1150. menu item, like:
  1151.  
  1152. ;-----
  1153. Support Menu
  1154.         /load support.mnu
  1155. Word Perfect
  1156.         wp
  1157. ;-----
  1158.  
  1159. Here, if Support Menu is chosen, then the system will load the SUPPORT.TXT
  1160. menu file from DOSmenu's _home_ directory to temporarily replace the active
  1161. menu file.  You may do this an unlimited number of times.  After a command is
  1162. run, the original main menu reloads.
  1163.  
  1164. To prevent the original main menu from reloading, use /MENU.  This command
  1165. forces the menu to become the permanent new default main menu.  If you wish
  1166. users to have the option of going back to the original menu later, you will
  1167. have to give them that option with another /MENU command in the new menu,
  1168. like:
  1169.  
  1170. ;----
  1171. M Main Menu
  1172.         /menu dosmenu
  1173. ;----
  1174.  
  1175.                                 SUB-MENUS (9)
  1176. ==============================================================================
  1177.  
  1178. Sub-menus are just like the main menu except that their title is the first
  1179. line of their definition.  The main menu's title is the first line of the
  1180. menu file.  Their title must start with a percent '%' character, and when
  1181. called from another menu, this percent character must be included.  Here is an
  1182. example:
  1183.  
  1184. ;-----
  1185. %Main Menu
  1186.  
  1187. Word Perfect
  1188.         wp
  1189. Utilities
  1190.         %Utility Menu
  1191. Paradox
  1192.         paradox
  1193.  
  1194. ;The , 5, 10 is optional and determines x and y menu window coordinates
  1195. %Utility Menu, 5, 10
  1196. Directory of...
  1197.         dir @ /p
  1198. Check disk
  1199.         chkdsk @:
  1200. ;-----
  1201.  
  1202. Here, the sub-menu '%Utility Menu' is called from one of the main menu items.
  1203.  
  1204. Sub-menus follow the server-based convention along the vertical development of
  1205. the menu file.  In other words, if a sub-menu is found under the :SERVER2
  1206. server name line, then it will not be accessible from a menu calling it which
  1207. is situated under :SERVER1.  Sub-menus are typically placed at the end of the
  1208. menu file under an :ALL alias server name section.
  1209.  
  1210. Sub-menus can only be shown on the screen once, yet they can be called from
  1211. more than one menu.  For example, if the main menu calls sub-menu2 with one of
  1212. its items, it is OK for sub-menu1 to do the same thing.  However, if sub-menu2
  1213. calls sub-menu1 also, and you select sub-menu1 from the main menu, then select
  1214. sub-menu2, and then try to select sub-menu1 again, DOSmenu will issue a
  1215. non-destructive error explaining that sub-menu1 is already on the work space.
  1216. No harm will be done, but you will have to back up to use sub-menu1 again.
  1217.  
  1218. There is, of course, no way to call the main menu from a sub-menu because of
  1219. the above restriction.
  1220.  
  1221. When viewing a sub-menu on the menu screen, a right arrow is added to the
  1222. sub-menus menu item text to denote the fact that it is a sub-menu.
  1223.  
  1224.                           COMPILING MENU FILES (10)
  1225. ==============================================================================
  1226.  
  1227. The DMutil program will compile and decompile init and menu files, if desired.
  1228. The syntax is:
  1229.  
  1230.      DMUTIL /C FILENAME
  1231.  
  1232. The output compiled file will be the same name.  You can then later decompile
  1233. the file with the command:
  1234.  
  1235.      DMUTIL /D FILENAME
  1236.  
  1237. Compiling init and menu files is not, repeat not, required.  Your users can
  1238. run DOSmenu all day long without ever compiling one file.  However, there is
  1239. one overriding reason why you may wish to consider compiling them after they
  1240. have been tested -security.  Your menus are much more secure when compiled.
  1241. Even smart users will not know what rights you have put where, what the
  1242. passwords are, etc.  The choice is yours.  DOSmenu is smart enough to know
  1243. what type of file is being loaded.
  1244.  
  1245.                          TRANSLATING MENU FILES (11)
  1246. ==============================================================================
  1247.  
  1248. You can easily translate NetWare batch files to DOSmenu batch files with the
  1249. DMutil utility with the following command:
  1250.  
  1251.      DMUTIL /T NETWARE_MENU_NAME
  1252.  
  1253. The generic default server name flag :ALL will be placed two lines after the
  1254. main menu title, giving access to all servers initially.
  1255.  
  1256. If your NetWare menu used any @variable"fill-in lines", then you must change
  1257. them within the new menu file to DOSmenu's format as it uses the external
  1258. DMquery utility for this purpose with additional options.
  1259.  
  1260.                           TEMPORARY BATCH FILES (12)
  1261. ==============================================================================
  1262.  
  1263. Normally DOSmenu simply takes a menu's DOS command and stuffs it into the DOS
  1264. variable _dmcmd so that the startup batch file, MENU.BAT, can then run it
  1265. after DOSmenu quits.  However if their is more than one DOS command, this
  1266. approach would not work.  Therefore DOSmenu instead will make a temporary
  1267. batch file and stuff the name of that batch file to the variable instead.
  1268.  
  1269. The location and name of the temporary batch file is as follows:
  1270.  
  1271. Name
  1272. ----
  1273. On a Novell network, the name will be _DMBTn.BAT where n is the actual
  1274. network connection number taken by the user's work station.  This way, a user
  1275. could actually run the menu system from two different work stations under the
  1276. same login ID without problems.
  1277.  
  1278. If not on a Novell network, then the batch file is simply named _DMBT.BAT.
  1279.  
  1280. Location
  1281. --------
  1282. If the Private Directory option in the init file was filled out with a
  1283. directory, then the batch file will be written and run from that directory.
  1284. If not, then it will be written and run from DOSMENU.EXE's home directory,
  1285. which is fine for stand-alone environments.
  1286.  
  1287. Notes
  1288. -----
  1289. Each time a temporary batch file is made, an '@echo off' is automatically
  1290. placed at the top of the file, relieving you from having to add that cosmetic
  1291. line to every multi-command menu item.  Also, 'call ' is placed at the
  1292. beginning of every line.  This syntax _only_ affects commands that are
  1293. actually batch file names, allowing them to return to DOSmenu's temporary
  1294. batch file at completion.
  1295.  
  1296. Example
  1297. -------
  1298. If a menu item looked like this:
  1299.  
  1300. ;-----
  1301. Word Perfect
  1302.         f:
  1303.         cd\apps\wp51
  1304.         wp
  1305.         h:
  1306.         cd\
  1307. ;-----
  1308.  
  1309. then the corresponding batch file would look like this:
  1310.  
  1311. call @echo off
  1312. call f:
  1313. call cd\apps\wp51
  1314. call wp
  1315. call h:
  1316. call cd\
  1317.  
  1318.                         DOS ENVIRONMENT VARIABLES (13)
  1319. ==============================================================================
  1320.  
  1321. DOSmenu uses up to seven DOS variables to make the system work without _any_
  1322. overhead; user ID, server name, workstation node address, command for a
  1323. selected menu item, last time the DOSMENU.NTE file was changed (for noticing),
  1324. software metering application, and name of the last 'main menu' used.
  1325.  
  1326. The node address variable is always needed if you intend to restrict any menu
  1327. items by comparing a work station's node address.  In a Novell network, you
  1328. could define this variable like:
  1329.  
  1330.      DOS SET _NODE="%P_STATION"<<4
  1331.  
  1332. where the <<4 takes the first 4 numbers away from the actual twelve digit
  1333. address.
  1334.  
  1335. The user ID and server name variables are only needed if you are not running
  1336. on NetWare and are not on a stand-alone environment.  In this case, you define
  1337. and load two DOS variables once during the user login script with the correct
  1338. information.  In the case of Novell (where this procedure is not necessary)
  1339. you would add these lines to the login script:
  1340.  
  1341.      DOS SET _USER="%LOGIN_NAME"
  1342.      DOS SET _SERVER="%FILE_SERVER"
  1343.  
  1344. where _user and _server and be called anything you wish.  You would then add
  1345. these two names two the init file so DOSmenu will know what they are called.
  1346. It takes care of the rest.
  1347.  
  1348. The variable for the menu item command is called _dmcmd and is always used.
  1349. When a menu item is selected that has an associated command that is not
  1350. another menu (sub-menu command), then DOSmenu either places that command in
  1351. this DOS variable if it was a singular command or else DOSmenu makes a batch
  1352. file out of the multiple DOS commands for that menu item and then passes the
  1353. name of the batch file to this variable.  Either way, the MENU.BAT file then
  1354. runs that command kept in the variable _dmcmd.
  1355.  
  1356. The variable _dmnte is used when you wish to leave dynamic notices to
  1357. any and all users.
  1358.  
  1359. The menu name variable, _dmmnu, keeps track of the last permanent main menu
  1360. used in DOSmenu before quitting to the batch file as well as the last
  1361. sub-menu and item selected.  This variable is then placed on the re-enter
  1362. DOSmenu line of the startup batch file.  That is how DOSmenu controls the
  1363. /MENU menu command.
  1364.  
  1365. The _dmmtr variable holds the meter rights issued with the current DOS
  1366. command, if any.
  1367.  
  1368. DMquery also uses environment variables.  It will use up to 9 variables named
  1369. _dmq1, _dmq2, .., _dmq9.
  1370.  
  1371.                                 NOTICING (14)
  1372. ==============================================================================
  1373.  
  1374. DOSMENU.NTE is used to leave notices to any and all users -dynamically.  Here
  1375. you may place notices based on the rights defined for each notice.  Each
  1376. notice consists of at least two lines; line 1 contains the rights and the
  1377. following lines (up to 10) contain the actual notice, like:
  1378.  
  1379. ;-----
  1380. {g=paradox} {s=server1}
  1381. Paradox will be down on SERVER1 all day today.
  1382. Hopefully it will be up tomorrow...
  1383. ;-----
  1384. Here, only users in group PARADOX on server SERVER1 will get this notice when
  1385. they next start up the menu system.
  1386.  
  1387. Each user may have up to 15 active notices.  Each notice may have up to 10
  1388. lines of up to 70 characters long.
  1389.  
  1390. You can add and subtract from this section anytime throughout the day.  When
  1391. a user starts the menu system, and after returning to the menu system, the
  1392. notices are checked and shown, if needed.  This gives the noticing system a
  1393. dynamic quality that can be quite useful to you as an administrator!
  1394.  
  1395. The time stamp of the file when the user reads notices is kept in a DOS
  1396. variable called _dmnte.  This variable is checked each time a user reloads the
  1397. menu system after running a command.  If you have made a change to the
  1398. DOSMENU.NTE file during that time, then the user will see the notices again,
  1399. and the variable will be updated.
  1400.  
  1401.                              PERSONAL MENUS (15)
  1402. ==============================================================================
  1403.  
  1404. On a network, each user may use and maintain one personal menu, named
  1405. DOSMENU.PER.  This menu file is kept and read from the user's defined private
  1406. directory.  
  1407.  
  1408. The F5 key will load (like /LOAD) the menu for the user so he/she can use it.
  1409. After running a command from it, DOSmenu will return to the last shared menu.
  1410. If the personal menu does not yet exist, a shell will be created for the user
  1411. first.
  1412.  
  1413. The F6 key allows the user to edit the personal menu with DMutil.  All
  1414. commands that would grant access to other parts of your network are disabled
  1415. while the user is editing the menu.  Only the SAVE and QUIT commands are
  1416. enabled.
  1417.  
  1418. To disallow the personal menu option, set the "Allow Personal Menus" line to
  1419. NO in DOSMENU.INI.
  1420.  
  1421. If allowed, we recommend setting the "Force Personal NoBreaks" line to YES.
  1422. Otherwise, a user may inadvertently set up a DOS command like "dir /p" or
  1423. setup a DOS batch file (by entering two or more commands for a menu item) that
  1424. they may later be able to break out of with ^C or ^Break.  Setting nobreaks to
  1425. yes prevents this from ever happening.  One disadvantage to using this
  1426. approach is that any NetWare search mappings contained within a batch file
  1427. will not work.  An alternative approach would be to set nobreaks to false and
  1428. instead use the included NOBRK TSR utility, which ensures complete nobreak
  1429. protection without affecting network batch file-based search mappings.
  1430.  
  1431.                         SOFTWARE METERING SERVICE (16)
  1432. ==============================================================================
  1433.  
  1434. DOSmenu now includes a powerful capability called software metering which
  1435. enables you to control the number of simultaneous run instances of an
  1436. application.  For instance, if you have bought 25 licenses for WordPerfect,
  1437. you now have the means to insure that only 25 copies are run at one time from
  1438. with the menu system on your network.
  1439.  
  1440. There are more expensive and perhaps more foolproof offerings on the market
  1441. for this service, but DOSmenu does the job simply and easily.  And we believe
  1442. that an administrator's effort level in attempting to control software
  1443. licensing is at least 95% of any large distributor's concerns.
  1444.  
  1445. Here is how you set up metering:
  1446.  
  1447. 1.  Place these commands in the DOSMENU.INI file:
  1448.  
  1449. Use Metering=yes
  1450. Metering File=f:\share\dosmenu.mtr (or something like that)
  1451.  
  1452. Users must have WRITE and ERASE rights to the above area.
  1453.  
  1454. 2.  Place the meter right on those commands you want metered, for example:
  1455.  
  1456. ;-----
  1457. W WordPerfect
  1458.         {m=wp51:25}
  1459.         f:\apps\wp\wp
  1460. ;-----
  1461.  
  1462. will meter the use of F:\APPS\WP\WP.EXE for all accesses from DOSmenu.  If
  1463. 25 instances are already in use (in this example), then DOSmenu will instruct
  1464. the user that the maximum licenses are in use and to try again later.
  1465.  
  1466. The syntax is important.  The application keyword, in this case WP51, may be
  1467. 10 or less characters with no spaces, followed by an immediate colon ':',
  1468. followed by an immediate number from 1 to 999 (with no spaces) -or- if no
  1469. :number is entered, then 999 is assumed (good for counting accesses only).
  1470.  
  1471. Of course anyone accessing WP.EXE from outside of the menu system will not be
  1472. metered in this way.  See the DMMETER UTILITY section to find out how to
  1473. meter software run from outside the menu system.  Also, if you call the
  1474. application from more than one menu item in your menu file, make sure you
  1475. place the meter rights for each item.
  1476.  
  1477. Note: RECOMMEND DELETING THIS FILE PERIODICALLY/NIGHTLY...
  1478. If any user locks up while in a metered application, or gets rebooted at that
  1479. point, then the meter count for that app will remain off by one (it will show
  1480. one greater than actual).  For this reason, we recommend deleting the defined
  1481. meter file periodically, perhaps at night before or after your backup.  On the
  1482. other hand, if a user gets kicked out of a metered application but returns to
  1483. the menu system, the count will remain accurate.
  1484.  
  1485. Be careful when looking at your meter file.  The recommended way to view it is
  1486. with the F8 command from the menu itself.  However, grabbing an instance of it
  1487. with DMUTIL [PATH]METER_FILE_NAME is safe as long as you DO NOT save the file.
  1488. Do not look at the file with file viewers that do not cleanly close the file
  1489. after retrieving it, else other users will not be able to update it (and
  1490. thence your metering numbers will be inaccurate as long as they are in the
  1491. metered application).  Vern Buerg's shareware LIST.COM program IS a safe
  1492. viewing program for this purpose.  The Norton Commander viewer is NOT.
  1493.  
  1494. This metering option is also quite useful when trying to get the 'pulse' of
  1495. what users are doing on your network.
  1496.  
  1497. A small dot (·) is placed just to the left of all menu items when metering has
  1498. been defined for that item and metering is turned on and a metering file has
  1499. been defined.
  1500.  
  1501.                         DMUTIL MAINTENANCE UTILITY (17)
  1502. ==============================================================================
  1503.  
  1504. COMMAND PARAMETERS
  1505. ==================
  1506.  
  1507. The DMutil program keeps all of your menu maintenance requirements in one
  1508. utility.  Anything you need to do to your menu system can be done with DMutil.
  1509.  
  1510. Here is the command syntax:
  1511.  
  1512.      DMUTIL ?
  1513.      DMUTIL /M|T|C|D FILENAME
  1514.      DMUTIL
  1515.      DMUTIL FILE|SPEC [[FILE|SPEC] ..]
  1516.      DMUTIL /L [USER_ID]
  1517.  
  1518. where:
  1519.  
  1520.       ? = DMutil and system installation quick help
  1521.  
  1522.      /M = Makes default DOSmenu batch, menu, init, and note files
  1523.  
  1524.      /T = Translates NetWare menu files
  1525.  
  1526.    /C|D = Compiles|Decompiles DOSmenu init, menu, or note files
  1527.  
  1528.         = Edits all menu system files at once
  1529.  
  1530.  FILE.. = Edits any number of text file(s) up to 64K in length each
  1531.  
  1532.      /L = parses specific user ID entries from the central log file, if used.
  1533.  
  1534.  
  1535. THE MENU FILE EDITOR
  1536. ====================
  1537.  
  1538. The editor is a simple ascii text editor that has specific help screens to
  1539. give you some on-line help on all menu file types.  In actuality, any ascii
  1540. editor can be used to edit the startup batch, init, menu and note files (if
  1541. they have not been compiled).
  1542.  
  1543. It's operation is self-explanatory, but a few items are worth mentioning:
  1544.  
  1545. o    Edits files with any DOS attribute set and then resets those attributes
  1546.      afterwards.
  1547.  
  1548. o    Automatically decompiles - edits - recompiles your menu files for you.
  1549.  
  1550. o    Can edit many text files at once with commands like \WINDOWS\*.INI, etc.
  1551.  
  1552. o    Can show tabs and spaces in a file on screen.
  1553.  
  1554.                        DMQUERY BATCH INPUT UTILITY (18)
  1555. ==============================================================================
  1556.  
  1557. DMquery is a utility that can be used to provide input for batch files made
  1558. with DOSmenu.
  1559.  
  1560. Here are the command line parameters:
  1561.  
  1562.      DMQUERY n [/R|U|E|Danswer]
  1563.  
  1564. where
  1565.  
  1566.       n = A number from 1..9
  1567.  
  1568.      /R = Input is required (an answer must be given)
  1569.  
  1570.      /U = Input will be forced to upper case
  1571.  
  1572.      /E = Input will be echoed to the screen afterwards
  1573.  
  1574. /Danswer = Input default answer will be 'answer' (must be one word only)
  1575.  
  1576.  
  1577. The DOS variable '_DMQn' is temporarily used.  DMquery may be run from DOS or
  1578. a DOS shell; however, it must be queried for and acted upon within the _same_
  1579. batch file, like:
  1580.  
  1581.      @echo off
  1582.      echo What is your name?  {your question}
  1583.      dmquery 1 /r/dJoe        {answer required, put in var _DMQ1, def=Joe}
  1584.      if errorlevel 255 goto.. {not enough env space? -optional}
  1585.      echo %_dmq1%             {use answer variable _DMQ1 as you wish!}
  1586.  
  1587. Here is an example DOSmenu menu item:
  1588.  
  1589. ;-----
  1590. D Directory
  1591.         echo Directory of what?
  1592.         dmquery 1
  1593.         echo Switches (/w, /p, etc)?
  1594.         dmquery 2
  1595.         dir %_DMQ1% %_DMQ2%
  1596.         pause
  1597. ;-----
  1598.  
  1599.                          DMMETER METERING UTILITY (19)
  1600. ==============================================================================
  1601.  
  1602. This utility can optionally monitor your software usage from outside of the
  1603. menu system.  It does the same thing DOSmenu does when you activate the meter
  1604. right for a menu item, except it does it from within DOS batch files.
  1605.  
  1606. Here are the command line parameters:
  1607.  
  1608.      DMMETER APP[:LICENSE_COUNT] {before batch command} 
  1609.  
  1610. and
  1611.  
  1612.      DMMETER {after batch command}
  1613.  
  1614. Here is an example batch file:
  1615.  
  1616. @echo off
  1617. [path]dmmeter wp51:25    ;add instance of wp51 app to meter file
  1618. if errorlevel 1 goto END ;if too many instances already, don't do it
  1619. f:\apps\wp\wp            ;run the app
  1620. [path]dmmeter            ;subtract instance of wp51 from meter file
  1621. :END
  1622.  
  1623. DMMETER.EXE must reside in DOSMENU.EXE's home directory, and DOSMENU.INI must
  1624. also be present in DOSMENU.EXE's home directory.
  1625.  
  1626. If an errorlevel 1 is returned, an error window pops up to tell the user
  1627. of the problem and asks them to try again later.
  1628.  
  1629. To reset a problem app (one that locks machines now and then?) to 0 in the
  1630. meter file (instead of deleting the entire file) run DMmeter with the reset
  1631. switch, like:
  1632.  
  1633.      DMMETER /RESET APP
  1634.  
  1635. Example:
  1636.  
  1637.      dmmeter /reset wp51
  1638.  
  1639. To view concurrent usage of metered software applications from the DOS prompt,
  1640. like F8 inside the menu, use:
  1641.  
  1642.      DMMETER /VIEW
  1643.  
  1644.                             EXAMPLE MENU FILE (20)
  1645. ==============================================================================
  1646.  
  1647. The below network menu file example is listed with a generous helping of legal
  1648. and illegal comments.  Note that comments must commence only at the start of a
  1649. line and NOT at the middle to end of a line even though we use it here to
  1650. better comment the code for you.
  1651.  
  1652. ;The menu name for this overall main menu below.
  1653. %Our Network Menu, 10, 5      ;numbers optional: 10 = x, 5 = y on screen
  1654.                               ;  placement of upper left corner of menu window
  1655. ;This server section means any server and/or a stand-alone environment.
  1656. ;These commands will be at the top of every user's menu.
  1657. ;Note the required blank line before the :SERVER_NAME line
  1658.  
  1659. :ALL
  1660. M Mail
  1661. ;All members of EMAIL_USERS will get the Mail menu item.
  1662.         {g=email_users}
  1663. ;The help line for this item (shown at the bottom of the screen)
  1664.         #Send and receive mail to and from other users
  1665. ;If selected, the command/permanent batch file EMAIL will be run.
  1666.         email
  1667.  
  1668. ;This section is for CENTRAL server users only.
  1669. :CENTRAL
  1670. P Paradox
  1671.         {g=support,paradox} {p=restrict}
  1672.         #Database program                  
  1673.         f:                                 ;A multi-command item that
  1674.         cd\apps\paradox                    ;  generates a temp batch file.
  1675.         paradox                            ;
  1676. W WordPerfect
  1677.         {g=wp_central} {m=wp51:25}         ; metered for 25 instances
  1678.         #Word processor
  1679.         f:\apps\wp51\wp
  1680. ;The next item ask a yes/no question first.
  1681. C Check printing
  1682.         {u=check_printer} {q=Are you sure you want to print checks?}
  1683.         #Print all due checks to the upstairs printer
  1684.         checkprt
  1685. I INSAPP
  1686.         {g=insapp_users,support;u=adm} {s=server1}
  1687.         #Our main database application
  1688.         ins
  1689. S Support Menu                ;Another complete menu file which is called
  1690.         /load support         ;  with this line.
  1691. S Accounting Menu             ;Another complete menu file which is called
  1692.         /menu acctng          ;  with this line and becomes the default menu.
  1693.  
  1694. ;This section is for BRANCH_ONE server users only.
  1695. :BRANCH_ONE
  1696. A Central connection
  1697.         {g=awlan}
  1698.         #Connect with the home office by modem
  1699.         connect
  1700. W WordPerfect
  1701.         {g=wp_branch}
  1702.         #Word processor
  1703.         wp
  1704.  
  1705. ;This server section means any server and/or a stand-alone environment.
  1706. ;These commands will be at the bottom of every user's menu.
  1707. :ALL
  1708. U Utility Menu
  1709.         #Various utilities
  1710.         %Utility Menu
  1711. B Backup Server Menu
  1712.         #Backup options
  1713.         %Backup Server Menu
  1714. L Logout of network
  1715.         {q=Are you sure?}
  1716.         #Log out of the network
  1717.         logout                ;You could also enter 'goto end' to simply quit
  1718.                               ;  the menu system, if desired.
  1719. ;Remember to place a blank line before all %SUB-MENU NAME lines
  1720. %Utility Menu, 5, 10          ;Display at xy coords 5 and 10 on screen
  1721. P Change your network printer
  1722.         capture @             ;This command asks a question first.
  1723. D Directory of...
  1724.         #Obtain a directory listing
  1725.         dir @ /p              ;This command asks a question first.
  1726. D Directory of (another way)...
  1727.         echo Directory of what?
  1728.         dmquery 1             ;DMquery external batch utility
  1729.         echo Switches (/w /p, etc)?
  1730.         dmquery 2
  1731.         dir %_dmq1% %_dmq2%
  1732.         pause
  1733.  
  1734. %Backup Server Menu
  1735. D Daily backup procedure
  1736.         bud
  1737. W Weekly backup procedure
  1738.         buw
  1739.